package org.example.config;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import javax.annotation.PostConstruct;
import java.util.List;

/**
 * @author shenguangyang
 */
@Slf4j
@Getter
@Setter
@ToString
@RefreshScope
@ConfigurationProperties("extension-demo")
public class ExtensionDemoConfig {
    private String username;
    private List<String> dataList;

    @PostConstruct
    public void init() {
        log.info("{} init", this.getClass().getName());
        log.info("object: {}", this);
    }
}
